package Day014_Lambda表达式_Stream流.ZuoYe.Test2;

/**
 * @author zhangyan
 * @date 2020/5/5 17:38
 */
public class Tset2 {
    public static void main(String[] args) {

        //Lambda标准形式
        invokeCalc(130, 120, (int a, int b) -> { return a - b; });

        //Lambda省略形式
        invokeCalc(130, 120, (a, b) -> a - b);
    }

    private static void invokeCalc(int a, int b, Calculator calculator) {
        int result = calculator.calc(a, b);
        System.out.println("结果是：" + result);
    }
}
